package Ite;

public class Client {
    public static void display(Television tv){
        TVIterator i = tv.createIterator();
        System.out.println("电视机频道：");
        while(!i.isLast()){
            System.out.println(i.currentChannel());
            i.next();

        }
    }
    public static void main(String[] args) {
        Television skyworthTv = new SkyworthTelevision();
        Television tclTv = new TCLTelevision();

        System.out.println("创维电视的频道列表:");
        display(skyworthTv);

        System.out.println("\nTCL电视的频道列表:");
        display(tclTv);
    }
}
